package com.ruoyi.system.service.impl;

import com.ruoyi.common.core.domain.entity.RestaurantOrderDetail;
import com.ruoyi.system.mapper.RestaurantOrderDetailMapper;
import com.ruoyi.system.service.RestaurantOrderDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class RestaurantOrderDetailServiceImpl implements RestaurantOrderDetailService {
    @Autowired
    RestaurantOrderDetailMapper restaurantOrderDetailMapper;
    @Override
    public List<RestaurantOrderDetail> getNormalOrderDetailList(RestaurantOrderDetail restaurantOrder) {
        return restaurantOrderDetailMapper.selectList(restaurantOrder);
    }

    @Override
    public RestaurantOrderDetail selectNormalOrderDetailById(Long id) {
        return restaurantOrderDetailMapper.selectById(id);
    }

    @Override
    public Boolean createNormalDetailOrder(RestaurantOrderDetail restaurantOrder) {
        return restaurantOrderDetailMapper.insert(restaurantOrder);
    }

    @Override
    public Boolean updateNormalDetailOrder(RestaurantOrderDetail restaurantOrder) {
        return restaurantOrderDetailMapper.update(restaurantOrder);
    }

    @Override
    public Boolean updateNormalDetailOrderByCondition(RestaurantOrderDetail restaurantOrder) {
        return restaurantOrderDetailMapper.updateByCondition(restaurantOrder);
    }

    @Override
    public Boolean deleteNormalOrderDetailById(Long id) {
        return restaurantOrderDetailMapper.deleteById(id);
    }

    @Override
    public Boolean deleteNormalByIds(List<Long> ids) {
        return restaurantOrderDetailMapper.deleteByIds(ids);
    }
}
